package org.ycx.doc.dao.model;

import java.io.Serializable;
import org.ycx.common.annotation.FormDesc;

@FormDesc(isMidTable=true)
public class DocUserVersion implements Serializable {
    /** 项目编号 */
    @FormDesc(name="项目编号",maxLength=10,type=1)
    private Integer appId;

    /** 用户编号 */
    @FormDesc(name="用户编号",maxLength=10,type=1)
    private Integer userId;

    /** 查看的版本号 */
    @FormDesc(name="查看的版本号",maxLength=10,type=1)
    private Integer devVersion;

    private static final long serialVersionUID = 1L;

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getDevVersion() {
        return devVersion;
    }

    public void setDevVersion(Integer devVersion) {
        this.devVersion = devVersion;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", appId=").append(appId);
        sb.append(", userId=").append(userId);
        sb.append(", devVersion=").append(devVersion);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DocUserVersion other = (DocUserVersion) that;
        return (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDevVersion() == null ? other.getDevVersion() == null : this.getDevVersion().equals(other.getDevVersion()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDevVersion() == null) ? 0 : getDevVersion().hashCode());
        return result;
    }
}